#ifndef QTSINGLEANIMATIONEFFECT_H
#define QTSINGLEANIMATIONEFFECT_H

#include "QtAnimationEffect.h"
#include <QTimeLine>


class QtSprite;
class QtSingleAnimationEffect: public QtAnimationEffect
{
	Q_OBJECT

public:
	QtSingleAnimationEffect();
	QtSingleAnimationEffect(const QtSingleAnimationEffect& rhs);
	virtual ~QtSingleAnimationEffect();

	void SetDuration(unsigned int newDuration);
	void Start();
	
	QTimeLine* Timeline() const;
	unsigned int Duration() const;

protected:
	virtual void SetupAnimation() = 0;

protected slots:
	virtual void Update(qreal value) = 0;


private:
	QTimeLine *timer;
	unsigned int duration;
};

#endif //QTSINGLEANIMATIONEFFECT_H
